/* model */
import Field from "@model/entity/Field";
/* util */
import { randomString } from 'pub-bbx-utils';

const FormVideoSettingSourceField: Field = {
  defaultValue: null,
  displayName: "视频来源",
  fieldName: "source",
  formType: "select",
  guideProfessions: [],
  id: randomString(),
  isDelete: 0,
  isGuideData: false,
  isNull: 1,
  isSearch: 0,
  isSystem: 0,
  orderId: 0,
  placeHolder: "请输入内容，最多500字",
  setting: { selectType: 2, dataSource: [{ text: '本地上传', value: 'local' }, { text: '粘贴视频地址', value: 'origin' }] },
}

const FormVideoSettingUploadField: Field = {
  defaultValue: null,
  displayName: "上传视频",
  fieldName: "source",
  formType: "",
  guideProfessions: [],
  id: randomString(),
  isDelete: 0,
  isGuideData: false,
  isNull: 0,
  isSearch: 0,
  isSystem: 0,
  orderId: 0,
  placeHolder: "请输入内容，最多500字",
  setting: {},
}

const FormTitleSettingCoverImageField: Field = {
  defaultValue: null,
  displayName: "封面图片",
  fieldName: "coverImage",
  formType: "select",
  guideProfessions: [],
  id: randomString(),
  isDelete: 0,
  isGuideData: false,
  isNull: 0,
  isSearch: 0,
  isSystem: 0,
  orderId: 0,
  placeHolder: "建议10字以内，可为空",
  setting: { selectType: 2, dataSource: [{ text: '原视频封面', value: '原视频封面' }, { text: '自定义封面', value: '自定义封面' }] },
}

const FormTitleSettingUploadCoverField: Field = {
  defaultValue: null,
  displayName: "上传封面",
  fieldName: "coverImage",
  formType: "select",
  guideProfessions: [],
  id: randomString(),
  isDelete: 0,
  isGuideData: false,
  isNull: 0,
  isSearch: 0,
  isSystem: 0,
  orderId: 0,
  placeHolder: "建议10字以内，可为空",
  setting: {},
}

const FormVideoSettingVideoUrlField: Field = {
  defaultValue: null,
  displayName: "视频播放地址",
  fieldName: "videoUrl",
  formType: "text",
  guideProfessions: [],
  id: randomString(),
  isDelete: 0,
  isGuideData: false,
  isNull: 1,
  isSearch: 0,
  isSystem: 0,
  orderId: 0,
  placeHolder: "支持.mp4的视频播放地址",
  setting: {},
}

export {
  FormVideoSettingSourceField,
  FormTitleSettingCoverImageField,
  FormVideoSettingUploadField,
  FormTitleSettingUploadCoverField,
  FormVideoSettingVideoUrlField
}

export default {
  FormVideoSettingSourceField,
  FormTitleSettingCoverImageField,
  FormVideoSettingUploadField,
  FormTitleSettingUploadCoverField,
  FormVideoSettingVideoUrlField
}